package com.miracle.login.module.mvp.contract;

import com.miracle.basemvp.base.BaseResponse;
import com.miracle.basemvp.base.IModel;
import com.miracle.basemvp.base.IView;
import com.miracle.common.bean.User.User;
import com.miracle.common.mvp.entity.request.CheckVersionRequest;
import com.miracle.common.mvp.entity.response.DandelionResponse;
import com.miracle.common.mvp.entity.response.VersionInfo;
import com.miracle.login.module.mvp.entity.request.LoginRequest;
import com.miracle.login.module.mvp.entity.response.LoginResponse;

import io.reactivex.Observable;

/**
 * com.miracle.login.module.mvp.contract
 * (c)2018 AIR Times Inc. All rights reserved.
 *
 *
 * @author WangJQ
 * @version 1.0
 * @date 2018/6/29 16:28
 * @see com.miracle.login.module.mvp.contract
 */
public interface LoginContract {
    interface Model extends IModel {
        Observable<BaseResponse<User>> login(LoginRequest request);
        Observable<DandelionResponse<VersionInfo>> checkVersion(CheckVersionRequest request);
    }

    interface View extends IView {
        /**
         * 登陆成功
         */
        void loginSucc();
        /**
         * 发现新版本
         */
        void FindANewVersion(String msg);

        /**
         * 没有新版本
         */
        void NoNewVersion();
    }
}
